<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/base.css">
    <link rel="stylesheet" href="../css/zhuceww.css">
    <script src="./jQuery.js/jquery-3.6.0.js"></script>
</head>

<body>
    <header>
        <img src="https://x.dscmall.cn/storage/images/common/user_login_logo.png" alt="">
        <img src="https://x.dscmall.cn/storage/images/common/login_logo_pic.png" alt="">
        <p>
            <span>已注册可</span>
            <a href="./dengluww.html">在此登录</a>
        </p>
    </header>
    <div class="center">
        <a href="">
            <div class="center-left"></div>
        </a>
        <div class="center-right">
            <form action="">
                <div>
                    手 机 号 码
                    <input type="tel" placeholder="请输入手机号" class="tel">
                    <p></p>
                    <div></div>
                </div>
                <div class="code">
                    验 &nbsp; 证 &nbsp; 码
                    <input type="tel" placeholder="请输入图片验证码" class="verify">

                    <img src="https://x.dscmall.cn/captcha_verify.php?captcha=is_register_phone&384315271" alt=""
                        class="show">
                    <img src="	https://x.dscmall.cn/captcha_verify.php?captcha=is_register_phone&0.13606767843140632"
                        alt="">
                    <img src="	https://x.dscmall.cn/captcha_verify.php?captcha=is_register_phone&0.09366948875824388"
                        alt="">
                    <img src="https://x.dscmall.cn/captcha_verify.php?captcha=is_register_phone&0.15308881649823536"
                        alt="">
                    <img src="https://x.dscmall.cn/captcha_verify.php?captcha=is_register_phone&0.8291981092409537"
                        alt="">
                    <img src="	https://x.dscmall.cn/captcha_verify.php?captcha=is_register_phone&0.40162522608823736"
                        alt="">
                    <img src="	https://x.dscmall.cn/captcha_verify.php?captcha=is_register_phone&0.06976528619043831"
                        alt="">
                    <img src="https://x.dscmall.cn/captcha_verify.php?captcha=is_register_phone&0.5674568294928699"
                        alt="">
                    <img src="	https://x.dscmall.cn/captcha_verify.php?captcha=is_register_phone&0.697179007329974"
                        alt="">
                    <img src="	https://x.dscmall.cn/captcha_verify.php?captcha=is_register_phone&0.9217379238900565"
                        alt="">
                    <p></p>
                    <div></div>
                </div>
                <div class="gains">
                    手机验证码
                    <input type="text" placeholder="请输入短信验证码" class="note">
                    <a href="" class="gain">验证码</a>
                    <p></p>
                    <div></div>
                </div>
                <div>
                    设 置 密 码
                    <input type="password" placeholder="请输入密码" class="pass">
                    <p></p>
                    <div></div>
                </div>
                <div>
                    确 认 密 码
                    <input type="password" placeholder="请再次确认密码" class="password">
                    <p></p>
                    <div></div>
                </div>
                <div class="consent">
                    <input type="checkbox" class="and">
                    <span>我已阅读并同意</span>
                    <a href="" class="big">《大商创用户注册协议》</a>
                    <p></p>
                </div>
                <input type="button" value="立即注册" class="btn">
            </form>
        </div>
    </div>
    <footer>
        <p>
            <a href="">首页</a>
            <span>|</span>
            <a href="">隐私保护</a>
            <span>|</span>
            <a href="">联系我们</a>
            <span>|</span>
            <a href="">免责条款</a>
            <span>|</span>
            <a href="">公司简介</a>
            <span>|</span>
            <a href="">商家入驻</a>
            <span>|</span>
            <a href="">供应商入驻</a>
            <span>|</span>
            <a href="">意见反馈</a>
        </p>
        <p>
            <a href="">b2b2c</a>
            <span>|</span>
            <a href="">多用户商城系统</a>
            <span>|</span>
            <a href="">商城系统</a>
            <span>|</span>
            <a href="">ecjia新零售</a>
        </p>
        <p>
            <span>ICP备案证书号:</span>
            <a href="">沪ICP备14029880号-5</a>
        </p>
        <p>
            <a href="">版权所有 © 2005-2021 大商创,并保留所有权利。POWERED BY DSCMALL</a>
        </p>
    </footer>

    <script>
        $('.btn').click(function () {
            if ($('.and').prop('checked', 'false')) {
                $(this).prev('.consent').children('p').text('您没有接受协议')
            }
            if ($(this).prevAll('div').not('.consent').children('input').val('')) {
                $(this).prevAll('div').children('p').text('不能为空')
            }
        })



        // 手机号判定
        $('.tel').blur(function () {
            if (/\D/.test($(this).val())) {
                $(this).next('p').text('手机号码不是一个有效号码')
                $(this).parent('div').children('div').css('display', 'none')
            }
            else {
                $(this).next('p').text('');
                $(this).parent('div').children('div').css('display', 'block')
            }
        })
        // 验证码
        $('.verify').blur(function () {
            if (/\d/.test($(this).val())) {
                $(this).next('p').text('');
                $(this).parent('div').children('div').css('display', 'block')
            }
            else {
                $(this).next('p').text('验证码错误')
                $(this).parent('div').children('div').css('display', 'none')
            }
        })
        // 验证密码
        $('.pass').blur(function () {
            if (/^[a-zA-Z0-9_-]{8,16}$/.test($(this).val())) {
                $(this).next('p').text('');
                $(this).parent('div').children('div').css('display', 'block')
            }
            else {
                $(this).next('p').text('8-16位且必须包含大小写字母和数字的组合')
                $(this).parent('div').children('div').css('display', 'none')

            }
        })
        // 再次验证密码
        $('.password').blur(function () {
            if ($('.password').val() == $('.pass').val()) {
                $(this).next('p').text('');
                $(this).parent('div').children('div').css('display', 'block')
            } else {
                $(this).next('p').text('两次输入密码不一致')
                $(this).parent('div').children('div').css('display', 'none')
            }
        })


        // 验证码图片
        $('.code').find('img').click(function () {
            $(this).next().addClass('show').siblings().removeClass('show');
            if (this.index == 9) {
                $(this).prev().addClass('show').siblings().removeClass('show');
            }
        })
    </script>
</body>

</html>